<?php
/*cech*/
require '../GestionPermisos/config/conn.php';
   $vCOAR=$_POST["Txt_GA06COAR"];
   $vDEAR=$_POST["Txt_GA06DEAR"];
   $vDEDE=$_POST["Txt_GA07CODE"];
    
    /*if ExisteRegistro("tb01docu", "NUDO",$factura,"A") then
    {*/
	
	if (empty($vCOAR) || empty($vDEAR) || empty($vDEDE)) 
    { 
    echo'<strong><p class="alert-error">Complete el Formulario</p></strong>';
    } 

   else{
    $SQLstr = "INSERT INTO ga06areade (GA06COAR,GA06DEAR,GA07CODE)
	             VALUES('$vCOAR','$vDEAR','$vDEDE');";
		
    if (!$conectarBD->query($SQLstr))
    {
      echo'<script language=javascript>
        alert("No se a podido registrar los datos")
        self.location="mt01.php"
      </script>';
    }
	else{
		echo'<script language=javascript>
        alert("Registrado con exitos")
        self.location="index.php"
      </script>';
		}
    $conectarBD->close();
   }
?>